import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'proxy_check_platform_interface.dart';

/// An implementation of [ProxyCheckPlatform] that uses method channels.
class MethodChannelProxyCheck extends ProxyCheckPlatform {
  /// The method channel used to interact with the native platform.
  @visibleForTesting
  final methodChannel = const MethodChannel('proxy_check');

  @override
  Future<String?> getPlatformVersion() async {
    final version = await methodChannel.invokeMethod<String>('getPlatformVersion');
    return version;
  }
@override
  Future<bool?> checkProxy() async{
  final hasProxy = await methodChannel.invokeMethod<bool>('checkProxy');
  return hasProxy;
  }

}
